from typing import *

class Solution:
    def arrayPairSum(self, nums: List[int]) -> int:
        nums.sort()
        return sum((nums[i] for i in range(len(nums)) if i%2==0))

